home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / utility / ffe101.zip / EXEC.SWG / 0004_NEEXE.pas < prev    next >
Pascal/Delphi Source File  |  1996-09-03  |  5KB  |  94 lines

  1. --------E-NE EXE----------------------------
  2.  
  3. The  NE  EXE  files  are  the new  exe  files  used  by windows and OS/2
  4. executables.  They  contain  a small MZ  EXE  which prints "This program
  5. requires  Microsoft Windows" or something similar but Some files contain
  6. both DOS and Windows versions of the executable. The position of the new
  7. EXE header can be found in the old exe header - see the MZ EXE topic for
  8. further  information. All offsets within this  header are from the start
  9. of the header if not noted otherwise.
  10.  
  11. OFFSET              Count TYPE   Description
  12. 0000h                   2 char   ID='NE'
  13. 0002h                   1 byte   Linker major version
  14. 0003h                   1 byte   Linker minor version
  15. 0004h                   1 word   Offset of entry table (see below)
  16. 0006h                   1 word   Length of entry table in bytes
  17. 0008h                   1 dword  File load CRC (0 in Borland's TPW)
  18. 000Ch                   1 byte   Program flags, bitmapped :
  19.                                  0-1 - DGroup type :
  20.                                        0 - none
  21.                                        1 - single shared
  22.                                        2 - multiple
  23.                                        3 - (null)
  24.                                    2 - Global initialization
  25.                                    3 - Protected mode only
  26.                                    4 - 8086 instructions
  27.                                    5 - 80286 instructions
  28.                                    6 - 80386 instructions
  29.                                    7 - 80x87 instructions
  30. 000Dh                   1 byte   Application flags, bitmapped
  31.                                  0-2 - Application type
  32.                                        1 - Full screen (not aware of
  33.                                            Windows/P.M. API)
  34.                                        2 - Compatible with Windows/P.M. API
  35.                                        3 - Uses Windows/P.M. API
  36.                                    3 - OS/2 family application
  37.                                    4 - reserved?
  38.                                    5 - Errors in image/executable
  39.                                    6 - "non-conforming program" whatever
  40.                                    7 - DLL or driver (SS:SP info invalid, CS:IP
  41.                                        points at FAR init routine called with
  42.                                        AX=module handle which returns AX=0000h
  43.                                        on failure, AX nonzero on successful
  44.                                        initialization)
  45. 000Eh                   1 byte   Auto data segment index
  46. 0010h                   1 word   Initial local heap size
  47. 0012h                   1 word   Initial stack size
  48. 0014h                   1 dword  Entry point (CS:IP),
  49.                                  CS is index into segment table
  50. 0018h                   1 dword  Initial stack pointer (SS:SP)
  51.                                  SS is index into segment table
  52. 001Ch                   1 word   Segment count
  53. 001Eh                   1 word   Module reference count
  54. 0020h                   1 word   Size of nonresident names table in bytes
  55. 0022h                   1 word   Offset of segment table (see below)
  56. 0024h                   1 word   Offset of resource table
  57. 0026h                   1 word   Offset of resident names table
  58. 0028h                   1 word   Offset of module reference table
  59. 002Ah                   1 word   Offset of imported names table
  60.                                  (array of counted strings, terminated with a
  61.                                   string of length 00h)
  62. 002Ch                   1 dword  Offset from start of file to nonresident
  63.                                  names table
  64. 0030h                   1 word   Count of moveable entry point listed in
  65.                                  entry table
  66. 0032h                   1 word   File alignment size shift count
  67.                                   0 is equivalent to 9 (default 512-byte pages)
  68. 0034h                   1 word   Number of resource table entries
  69. 0036h                   1 byte   Target operating system
  70.                                   0 - unknown
  71.                                   1 - OS/2
  72.                                   2 - Windows
  73.                                   3 - European MS-DOS 4.x
  74.                                   4 - Windows 386
  75.                                   5 - BOSS (Borland Operating System Services)
  76. 0037h                   1 byte   Other OS/2 EXE flags, bitmapped
  77.                                  0 - Long filename support
  78.                                  1 - 2.x protected mode
  79.                                  2 - 2.x proportional fonts
  80.                                  3 - Executable has gangload area
  81. 0038h                   1 word   Offset to return thunks or start of gangload
  82.                                  area - whatever that means.
  83. 003Ah                   1 word   offset to segment reference thunks or length
  84.                                  of gangload area.
  85. 003Ch                   1 word   Minimum code swap area size
  86. 003Eh                   2 byte   Expected Windows version (minor version first)
  87.  
  88. EXTENSION:DLL,EXE,FOT
  89. OCCURENCES:PC
  90. PROGRAMS:
  91. REFERENCE:Windows 3.1 SDK Programmer's Reference, Vol 4.
  92. SEE ALSO:EXE,MZ EXE
  93.  
  94.